<!--
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2021-12-21 14:39:03
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-22 16:46:24
-->
<template>
  <div>
    <BasicTable @register="registerTable">
      <template #action>
        <TableAction :stopButtonPropagation="true" />
      </template>
    </BasicTable>
  </div>
</template>
<script lang="ts" setup>
  import { BasicTable, useTable, TableAction, FetchSetting } from '/@/components/Table';
  // schama
  import { columns, searchFormSchema } from './refund.data';
  import { refundList } from '/@/api/order/refund';
  const [registerTable] = useTable({
    title: '售后列表',
    api: refundList,
    fetchSetting: {
      sizeField: 'list.per_page',
      // // 请求接口当前页数
      pageField: 'list.current_page',
      // 请求结果列表字段  支持 a.b.c
      listField: 'list.data',
      // 请求结果总数字段  支持 a.b.c
      totalField: 'list.total',
    } as FetchSetting,
    columns,
    formConfig: {
      labelWidth: 70,
      schemas: searchFormSchema,
      // alwaysShowLines: 1,
    },
    useSearchForm: true,
    showTableSetting: true,
    bordered: true,
    showIndexColumn: false,
    actionColumn: {
      width: 80,
      title: '操作',
      dataIndex: 'action',
      slots: { customRender: 'action' },
      fixed: undefined,
    },
  });
</script>
